/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/mapping/{{entities@MINHERIT}}InheritMapping.java.hbs
 */
package cn.ibizlab.core.authentication.mapping;

import org.mapstruct.*;
import cn.ibizlab.core.authentication.domain.AuthLogin;
import cn.ibizlab.core.ad.domain.SysPerson;
import java.util.List;

/**
 * 登录信息继承映射[AuthLogin]
 *
 * @author generator
 */
@Mapper(componentModel = "spring", uses = {}, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface AuthLoginInheritMapping {

    /**
     * 转换SysPerson
     * 
     * @param authLogin
     * @return
     */
    @Mappings({
        @Mapping(source ="loginName",target = "uid"),
        @Mapping(source ="password",target = "userPassword"),
    })
    SysPerson toSysPerson(AuthLogin authLogin);

    /**
     * 转换 AuthLogin
     * 
     * @param sysPerson
     * @return
     */
    @Mappings({
        @Mapping(source ="uid",target = "loginName"),
        @Mapping(source ="userPassword",target = "password"),
    })
    AuthLogin toAuthLogin(SysPerson sysPerson);

}